This patch adds a WFI instruction in the default implementations of
plat_error_handler() and plat_panic_handler(). This potentially reduces
power consumption by allowing the hardware to enter a low-power state.
The same change has been made to the FVP and Juno platform ports.
Change-Id: Ia4e6e1e5bf1ed42efbba7d0ebbad7be8d5f9f173
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <arch_helpers.h>
#include <board_arm_def.h>
#include <debug.h>
#include <errno.h>
/* Loop until the watchdog resets the system */
for (;;)
- ;
+ wfi();
}
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <arch_helpers.h>
#include <errno.h>
#include <v2m_def.h>
/* Loop until the watchdog resets the system */
for (;;)
- ;
+ wfi();
}
* -----------------------------------------------------
*/
func plat_error_handler
+ wfi
b plat_error_handler
endfunc plat_error_handler
* -----------------------------------------------------
*/
func plat_panic_handler
+ wfi
b plat_panic_handler
endfunc plat_panic_handler